package com.isslin.service.handler;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;

public class NSChildHandler extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel channel) throws Exception {
        ChannelPipeline cp = channel.pipeline();
        cp
                //.addLast(new AjaxDecoder())
                //.addLast(new AjaxEncoder())
                .addLast(new StringEncoder())
                .addLast(new StringDecoder())
                .addLast(new NSHandler());
    }
}
